package com.ocn.li.scmdy.modules.app.service.impl;


import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ocn.li.scmdy.common.utils.QueryExt;
import com.ocn.li.scmdy.modules.app.dao.ChannelDao;
import com.ocn.li.scmdy.modules.app.entity.ChannelEntity;
import com.ocn.li.scmdy.modules.app.service.ChannelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * TODO ChannelService 实现类
 *
 * @author crazypenguin
 * @version 1.0.0
 * @createdate 2019/1/9
 */
@Service("channelService")
@Slf4j
public class ChannelServiceImpl extends ServiceImpl<ChannelDao, ChannelEntity> implements ChannelService {


    @Autowired
    private ChannelDao channelDao;

    @Override
    public Page selectPageByConditions(QueryExt query) {
        Map map = new HashMap();
        map.putAll(query.getCondition());
        query.setRecords(channelDao.selectPageByConditions(query, map));
        return query;
    }


}
